
package com.jf.cloud.product.feign;

import com.jf.cloud.api.product.feign.SpuCommFeignClient;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.product.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zz
 * @date 2020/11/27
 */
@RestController
public class SpuCommFeignController implements SpuCommFeignClient {

    @Autowired
    private SpuCommService spuCommService;

    @Override
    public ServerResponseEntity<List<Long>> getCommNumRankSpuIdsByShopIdAndTime(String key, Long shopId, Integer time, Integer expireTime, Integer esRenovationSpuSort, Long primaryCategoryId) {
        List<Long> spuIds = spuCommService.getCommNumRankShopIdAndTime(key,shopId,time,expireTime,esRenovationSpuSort, primaryCategoryId);
        return ServerResponseEntity.success(spuIds);
    }

}
